{% extends "base.html" %}


{% block menu %}

 <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="#">Project Manager System</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
              <li><a href="/">Logout</a></li>
              <li><a href="#contact">Usuario: {{session['username']}}</a></li>
              </ul>
          </div>
         </div>
        </div>
</div>
              
{%endblock%}

{%block mensaje%}
        {% with messages = get_flashed_messages(with_categories=true) %}
          {% if messages %}
          <div class="container" align="center">
            {% for category, message in messages %}
              <h4 class="{{ category }}">{{ message }}</h4>
            {% endfor %}
		  </div>
          {% endif %}
        {% endwith %}
{%endblock%}

{%block content%}
<div class="fases">
		<div class="container" align="center">
        <h3 class="muted">{{session['proyectonombre']}} - {{session['fasenombre']}}</h3>
        </div>
        <div class="row" >
                <div class="span12">
                        <h2>Posibles items padre</h2>
                        <table class="table table-striped table-bordered">
                                <tr>	
                                		<th>Version</th>
                                        <th>Nombre</th>
                                        <th>Estado</th>
				                        <th>Costo</th>
				                        <th>Dificultad</th>
				                        <th>Tipo</th>
				                        <th>Eliminado por</th>
				                        <th>Fecha de Eliminación</th>
				                        <th>Consultar</th>
				                        <th>Reversionar</th>
				                       
                                </tr>
                                {% for i in versiones %}
                    
                                <tr>
                                		<td>{{i.version}}</td>
                                        <td>{{i.nombre}}</td>
                                        <td>{{i.estado}}</td>
                                        <td>{{i.costo}}</td>
                                        <td>{{i.dificultad}}</td>
                                        <td>{{i.item.tipoitem.nombre}}</td>
                                        <td>{{usuarioMod[i.id]}}</td>
                                        <td>{{i.fechaModificacion.strftime('%Y-%m-%d')}}</td>
                                        <td>
                                        <a class="btn btn-info" href="/admitem/consultaritem/{{i.id}}">Consultar</a>
                                        </td>
                                        <td>
                                        <a class="btn btn-inverse" href="/admitem/reversionarb/{{i.id}}">Reversionar</a>
                                        </td>
                        		</tr>
                                {% else %}
                        
                                <tr>
                                        No hay versiones del item
                                </tr>
                                {% endfor %}
                </table>
                <a class="btn" href="/admitem/{{session['faseid']}}"><i class="icon-arrow-left"></i> Atras</a>
        </div>
	</div>
</div>
{%endblock%}
